﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace DSC
{
    public class ExportExcel
    {
        public static string Convert(string html, string directoryPath, string fileName)
        {
            string fullpath = "";

            if (directoryPath.Substring(directoryPath.Length - 1, 1) == @"\" || directoryPath.Substring(directoryPath.Length - 1, 1) == "/")
            {
                fullpath = directoryPath + fileName;
            }
            else
            {
                fullpath = directoryPath + @"\" + fileName;
            }

            StreamWriter SW = new StreamWriter(fullpath, false, Encoding.UTF8);




            SW.WriteLine(html);
            SW.Close();

            return fullpath;
        }
    }
}
